package com.nstar.base.dao;

import java.io.Serializable;
import java.util.List;

public interface BaseDAO {

//    public Query createSQLQuery(String sql, String returnAlias, Class returnClass);
//
//    public Query createSQLQuery(String sql, String[] returnAlias, Class[] returnClass);



    // SELECT

    public List loadAll(Class entityClass);

    public Object get(Class entityClass, Serializable id);

    public List find(String queryString);

    public List find(String queryString, Object value);

    public List find(String queryString, Object[] values);

    //public List find(String queryString, Object[] values, Type[] types);

    // INSERT

    public Serializable save(Object entity);

    // UPDATE

    public int update(Object entity);

    public int saveOrUpdate(Object entity);

    // DELETE

    public int delete(Object entity);

    public int delete(Class entityClass, Serializable id);

    public int delete(final String queryString);
}
